import Vue from 'vue'
import VueRouter from 'vue-router'
import First from '../taps/First.vue'
import Second from '../taps/Second.vue'
import Third from '../taps/Third.vue'
// import NotFound from '../taps/404.vue'
import NotFound from '../router-mode/NotFound.vue'


Vue.use(VueRouter)

const routes = [
     {
      path:'/', //路由值
      name:'First',
      redirect:'/qqqq',
      component:First
     },
     {
      path:'/Second',
      name:'Second',
      component:Second
    },
    {
      path:'/Third/:ids/:name',
      name:'Third',
      component:Third
    },
    {
      path:'*', //一定要放在最后,表示可以匹配所有的路径
      name:'NotFound',
      component:NotFound
    }
//   {
//     path: '/',
//     name: '',
//     component: Home
//   },  
//   {
//    path:'./tag',
//    name:'tag',
//    component:tag
//   },
//    {
//     path: '/First',
//     name: 'First',
//     component: First
//   },
//   {
// path: '/Second',
//     name: 'Second',
//     component: Second
//   },
//   {
// path: '/Third',
//     name: 'Third',
//     component: Third
//   },
  // {
  //   path: '/about',
  //   name: 'About',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  // }
]

const router = new VueRouter({
  mode:'hash', //配置路由模式
  routes:routes
})

export default router
